home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 008a / feb93cad.zip / TIP847A.LSP < prev    next >
Lisp/Scheme  |  1993-01-14  |  2KB  |  56 lines

  1. ;TIP847A: RAD.LSP (C)1993, CAREY T. WALDROP
  2.  
  3. (defun C:RAD ()
  4. (graphscr)
  5.    (setvar "cmdecho" 0)
  6.    (setq ss1 nil ss2 nil ss3 nil ss4 nil ss5 nil ss6 nil pt1 nil)
  7.    (setq lmin (getvar "limmin"))
  8.    (setq lmax (getvar "limmax"))
  9. (command "limits" "-10.0,-10.0" "10.0,10.0")
  10.    (setq ans  (getstring "\npick view screen to initiate creation from....."))
  11.    (if (= ans "") (setq ans 1))
  12. (command "vpoint" "r" "215" "30")
  13. (command "UCS" "v")
  14. (command "zoom" "w" "-1.5,-1.5" "1.5,1.5")
  15. (command "UCS" "w")
  16. (command "setvar" "pickbox" "2")
  17. (command "setvar" "surftab1" "3")
  18. (command "elev" "0" "0")
  19.    (setq d (getstring "\nwhat is the diameter of wire? "))(terpri)
  20.    (setq f (getint "\nwhat is the number of faces? "))(terpri)
  21.    (setq d1 (/ (atof d) 2))
  22.    (setq d2 (list d1 '0.0))
  23. (command "line" "0,0,0" "0,0,1" "")
  24.    (setq ss6 (ssget "L"))
  25. (command "polygon" f "0,0" "c" d2)
  26.    (setq ss2 (ssget "L"))
  27.    (setq b (list 0.0 0.0))
  28. (command "tabsurf" d2 b)
  29.    (setq ss1 (ssget "L"))
  30. (command "erase" ss6 "")
  31.    (setq ss6 nil)
  32. (command "move" ss1 "" "0,0" "@6<180")
  33.    (setq pt1 (list '0.0 (* (atof d) -1)))
  34. (command "UCS" "w")
  35. (command "line" pt1 "@1<0" "")
  36. (command "zoom" "e")
  37.    (setq ss5 (ssget "L"))
  38. (command "revsurf" d2 pt1 "0" "-90")
  39.    (setq ss3 (ssget "L"))
  40. (command "erase" ss5 "")
  41.    (setq ss5 nil)
  42. (command "zoom" "e")
  43. (command "erase" ss2 "")
  44.    (setq ss2 nil)
  45. (command "move" ss3 "" "0,0" "@6<180")
  46. (command "UCS" "x" "90")
  47. (command "UCS" "y" "-90")
  48. (command "mirror" ss1 "" pt1 "@1<45" "n")
  49. (command "ucs" "w")
  50. (command "zoom" "e")
  51. (command "setvar" "pickbox" "3")
  52. (command "setvar" "surftab1" "6")
  53. (command "limits" lmin lmax)
  54. (setvar "cmdecho" 1)
  55. )
  56.